<?php
class DomArTestClass_ValidationMessages extends DomArObject {
	
	
	/**
	 * @orm text
	 * @orm validator method textValidator( myValue )
	 */
	public $text;
	
	public function textValidator( $value, $correctValue, &$customParams ) {
		if( $value == $correctValue ) {
			return 0;
		} else {
			$customParams['badValue'] = (string)$value;
			$customParams['goodValue'] = (string)$correctValue;
			return 1001;
		}
	}
	
	public function getValidationErrorMessages() {
		return array(
			'text' => array(
				1001 => 'Bad value is: "[$badValue]" and good value is "[$goodValue]"',
			),
		);
	}
	
	
	
}
?>